package com.wechat.entity;

import com.swak.App;
import com.swak.annotation.Table;
import com.swak.persistence.BaseMapper;
import com.swak.persistence.Model;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 描述
 * 
 * @author Auto Generator
 * @date 2022-10-21T23:59:27.286447600
 */
@Getter
@Setter
@Accessors(chain = true)
@Table(value="WECHAT_MESSAGE")
public class Message extends Model<Message, Long> {
	
	@lombok.EqualsAndHashCode.Exclude
	@lombok.ToString.Exclude
	private static volatile transient BaseMapper<Message, Long> _mapper;
	
	public static final String Id = "ID";
	public static final String Sequence = "SEQUENCE";
	public static final String IsSender = "IS_SENDER";
	public static final String Talker = "TALKER";
	public static final String MsgType = "MSG_TYPE";
	public static final String MsgBrief = "MSG_BRIEF";
	public static final String MsgContent = "MSG_CONTENT";
	public static final String MsgFlag = "MSG_FLAG";
	public static final String CreateDate = "CREATE_DATE";
	public static final String UpdateDate = "UPDATE_DATE";
	public static final String DelFlag = "DEL_FLAG";
	public static final String DelAt = "DEL_AT";
	
	private Long sequence;
	private Byte isSender;
	private String talker;
	private Byte msgType;
	private String msgBrief;
	private String msgContent;
	private Integer msgFlag;
	
	
	@Override
	@SuppressWarnings("unchecked")
	protected BaseMapper<Message, Long> getSqlRunner() {
		if (_mapper == null) {
			synchronized (Message.class) {
				if (_mapper == null) {
					_mapper = (BaseMapper<Message, Long>) App.getBean(getTableDefine().getMapper());
				}
			}
		}
		return _mapper;
	}
	
	public static Message of() {
	    return new Message();
	}
}
